"""Constants for the Voice Assistant Control integration."""

DOMAIN = "voice_assistant_control"

# 服务器配置
SERVER_HOST = "https://hasskit.com"  # HTTP/HTTPS 服务器地址
SERVER_WS_HOST = "wss://hasskit.com"  #  WebSocket 服务器地址
REGISTER_URL = "https://hasskit.com/web/auth/register"  # 注册页面地址

# 配置项
CONF_USERNAME = "username"
CONF_PASSWORD = "password"
CONF_ENTITIES = "entities"

# 事件名称
EVENT_WEBSOCKET_CONNECTED = f"{DOMAIN}_websocket_connected"
EVENT_WEBSOCKET_DISCONNECTED = f"{DOMAIN}_websocket_disconnected"
EVENT_DEVICE_COMMAND = f"{DOMAIN}_device_command"

# WebSocket 相关
WEBSOCKET_RECONNECT_INTERVAL = 10  # 重连间隔（秒）
WEBSOCKET_HEARTBEAT_INTERVAL = 30  # 心跳间隔（秒）

# API 路径
API_LOGIN_PATH = "/api/auth/verify"
API_WEBSOCKET_PATH = "/ws"

CONF_API_URL = "api_url"
CONF_DEVICE_TYPES = "device_types"
CONF_SCAN_INTERVAL = "scan_interval"

# 传感器
SENSOR_CONNECTION_STATE = "connection_state"
CONNECTION_STATE_CONNECTED = "已连接"
CONNECTION_STATE_DISCONNECTED = "未连接"
CONNECTION_STATE_CONNECTING = "连接中"

# 允许的实体类型
ALLOWED_ENTITY_DOMAINS = [
    "light",      # 灯
    "climate",    # 空调
    "cover",      # 窗帘
    "switch",     # 开关
]

# 隧道服务配置
TUNNEL_SERVER_URL = "wss://hasskit.com/tunnel"  # TCP隧道服务器地址(云端)
